import instance from "@/utils/request";
import type { loginFrom, loginResponsData, UserInfoData} from "./types";
enum API{
  LOGIN_URL='/admin/acl/index/login',
  USERINFO_URL='/admin/acl/index/info',
  LOGOUT_URL='/admin/acl/index/logout'
}
// 登录
export const LoginAPI=(data:any)=>{
  return instance.post<any,any>(
    API.LOGIN_URL,
    data
  )
}

// 获取用户信息
export const UserInfoAPI=()=>{
  return instance.get<any,any>(API.USERINFO_URL)
}

// 退出登录
export const LogOutAPI=()=>{
  return instance.post<any,any>(API.LOGOUT_URL)
}
